﻿@using Orchard.ContentManagement;
@using Orchard.Widgets.Models;
@{
    var widgetPart = ((IContent)Model.ContentItem).As<WidgetPart>();
    var tag = Tag(Model, "article");
}
@tag.StartElement
    @if ( (widgetPart.RenderTitle && HasText(widgetPart.Title)) || Model.Header != null) {
    <header>
        @if ((widgetPart.RenderTitle && HasText(widgetPart.Title))) {
        <h1>@widgetPart.Title</h1>
        }
        @Display(Model.Header)
    </header>
    }
    @Display(Model.Child)
    @if(Model.Footer != null) {
    <footer>
        @Display(Model.Footer)
    </footer>
    }
@tag.EndElement